package arina.university.model;

import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 15.11.13
 * Time: 13:55
 * To change this template use File | Settings | File Templates.
 */
public class Chair {
    String name;

    public Chair(String name){
        this.name=name;
    }
    List<Teacher> teachers = new LinkedList<Teacher>();
    List<Group> groups = new LinkedList<Group>();

    public long getQuantity(){
        long q=0;
        for(Group g: groups) {
            q+=g.getQuantity();
        }
        return q;
    }

    public void addTeacher(Teacher teacher){
        this.teachers.add(teacher);
    }

    public void addGroup(Group group){
        this.groups.add(group);
    }

    public String getName(){
        return name;
    }

    public List<Group> getGroups(){
         return groups;
        }


    public List<Teacher> getTeachers(){
       return teachers;
    }


}
